<template>
  <div class="container">
    <top-nav>返回</top-nav>
    <workList :workList="workList1" class="workList" v-if="workList1!=''"></workList>
    <div v-else class="noJob">附近暂无职位</div>
  </div>
</template>

<script>
import workList from '@/components/workList';
import topNav from '@/components/topNav';
// var bmap = require('bmap-wx')
export default {
  data () {
    return {
      workList1:""
    }
  },
  computed:{
    area(){
      return this.$store.state.modulesIndex.area
    }
  },
  components: {
    workList,
    topNav
  },

  methods: {
    async getWorkList(province="",city="",area=""){
      let res=await this.$axios('/position/getPositionList',{params:{province:city,city:area}})
    //  console.log(res.data.data)
      this.workList1=res.data.data;
      for(let [index,value] of this.workList1.entries()){
        value.sex=this.$currency.sexTag1(value.sex)
      }
    }
  },
  activated(){
    this.getWorkList(this.area[0],this.area[1],this.area[2])
  },
}
</script>

<style scoped>

.tip{width: 100%;height: 100px;}
.search{width: 350px;height: 100%;position: relative;margin-left: 7.25px;margin-top: 15px;}
.search input{width: 330px;height:30px;line-height: 30px;position: absolute;left: 0;top: 6.25px;background-color: #fff;border-radius: 10px;padding-left:20px;background-color: #f1f1f1;}
.search img{width: 20px;height: 20px;position: absolute;right: 10px;top: 10.25px;}
.workList{margin-top:45px !important}
.noJob{ margin:80px auto;text-align: center}
</style>
